namespace ShareMarking.Entity {
    	using System;


    /// <summary>
    /// 表名：qr_QrCodeType 主键列：QrCodeTypeID
    /// </summary>
    [SerializableAttribute()]
    public partial class qr_QrCodeType : MySoft.Data.Entity
    {

        protected Int32 _QrCodeTypeID;

        protected String _QT_Name;

        protected String _QT_Desc;

        protected Int32 _QT_Count;

        protected Int32 _QT_StartIndex;

        protected Int32? _QT_CurrentIndex;

        protected Int32 _QT_EndIndex;

        protected Int32? _QT_Used;

        protected Int32? _QT_Surplus;

        protected String _QT_Template;

        protected String _QT_UserName;

        protected String _QT_SecretKey;

        protected DateTime? _CreateOn;

        protected DateTime? _ModifiedOn;

        public Int32 QrCodeTypeID
        {
            get
            {
                return this._QrCodeTypeID;
            }
            set
            {
                this.OnPropertyValueChange(_.QrCodeTypeID, _QrCodeTypeID, value);
                this._QrCodeTypeID = value;
            }
        }

        public String QT_Name
        {
            get
            {
                return this._QT_Name;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_Name, _QT_Name, value);
                this._QT_Name = value;
            }
        }

        public String QT_Desc
        {
            get
            {
                return this._QT_Desc;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_Desc, _QT_Desc, value);
                this._QT_Desc = value;
            }
        }

        public Int32 QT_Count
        {
            get
            {
                return this._QT_Count;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_Count, _QT_Count, value);
                this._QT_Count = value;
            }
        }

        public Int32 QT_StartIndex
        {
            get
            {
                return this._QT_StartIndex;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_StartIndex, _QT_StartIndex, value);
                this._QT_StartIndex = value;
            }
        }

        public Int32? QT_CurrentIndex
        {
            get
            {
                return this._QT_CurrentIndex;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_CurrentIndex, _QT_CurrentIndex, value);
                this._QT_CurrentIndex = value;
            }
        }

        public Int32 QT_EndIndex
        {
            get
            {
                return this._QT_EndIndex;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_EndIndex, _QT_EndIndex, value);
                this._QT_EndIndex = value;
            }
        }

        public Int32? QT_Used
        {
            get
            {
                return this._QT_Used;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_Used, _QT_Used, value);
                this._QT_Used = value;
            }
        }

        public Int32? QT_Surplus
        {
            get
            {
                return this._QT_Surplus;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_Surplus, _QT_Surplus, value);
                this._QT_Surplus = value;
            }
        }

        public String QT_Template
        {
            get
            {
                return this._QT_Template;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_Template, _QT_Template, value);
                this._QT_Template = value;
            }
        }

        public String QT_UserName
        {
            get
            {
                return this._QT_UserName;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_UserName, _QT_UserName, value);
                this._QT_UserName = value;
            }
        }

        public String QT_SecretKey
        {
            get
            {
                return this._QT_SecretKey;
            }
            set
            {
                this.OnPropertyValueChange(_.QT_SecretKey, _QT_SecretKey, value);
                this._QT_SecretKey = value;
            }
        }

        public DateTime? CreateOn
        {
            get
            {
                return this._CreateOn;
            }
            set
            {
                this.OnPropertyValueChange(_.CreateOn, _CreateOn, value);
                this._CreateOn = value;
            }
        }

        public DateTime? ModifiedOn
        {
            get
            {
                return this._ModifiedOn;
            }
            set
            {
                this.OnPropertyValueChange(_.ModifiedOn, _ModifiedOn, value);
                this._ModifiedOn = value;
            }
        }

        /// <summary>
        /// 获取实体对应的表名
        /// </summary>
        protected override MySoft.Data.Table GetTable()
        {
            return new MySoft.Data.Table<qr_QrCodeType>("qr_QrCodeType");
        }

        /// <summary>
        /// 获取实体中的标识列
        /// </summary>
        protected override MySoft.Data.Field GetIdentityField()
        {
            return _.QrCodeTypeID;
        }

        /// <summary>
        /// 获取实体中的主键列
        /// </summary>
        protected override MySoft.Data.Field[] GetPrimaryKeyFields()
        {
            return new MySoft.Data.Field[] {
    					_.QrCodeTypeID};
        }

        /// <summary>
        /// 获取列信息
        /// </summary>
        protected override MySoft.Data.Field[] GetFields()
        {
            return new MySoft.Data.Field[] {
    					_.QrCodeTypeID,
    					_.QT_Name,
    					_.QT_Desc,
    					_.QT_Count,
    					_.QT_StartIndex,
    					_.QT_CurrentIndex,
    					_.QT_EndIndex,
    					_.QT_Used,
    					_.QT_Surplus,
    					_.QT_Template,
    					_.QT_UserName,
    					_.QT_SecretKey,
    					_.CreateOn,
    					_.ModifiedOn};
        }

        /// <summary>
        /// 获取列数据
        /// </summary>
        protected override object[] GetValues()
        {
            return new object[] {
    					this._QrCodeTypeID,
    					this._QT_Name,
    					this._QT_Desc,
    					this._QT_Count,
    					this._QT_StartIndex,
    					this._QT_CurrentIndex,
    					this._QT_EndIndex,
    					this._QT_Used,
    					this._QT_Surplus,
    					this._QT_Template,
    					this._QT_UserName,
    					this._QT_SecretKey,
    					this._CreateOn,
    					this._ModifiedOn};
        }

        /// <summary>
        /// 给当前实体赋值
        /// </summary>
        protected override void SetValues(MySoft.Data.IRowReader reader)
        {
            if ((false == reader.IsDBNull(_.QrCodeTypeID)))
            {
                this._QrCodeTypeID = reader.GetInt32(_.QrCodeTypeID);
            }
            if ((false == reader.IsDBNull(_.QT_Name)))
            {
                this._QT_Name = reader.GetString(_.QT_Name);
            }
            if ((false == reader.IsDBNull(_.QT_Desc)))
            {
                this._QT_Desc = reader.GetString(_.QT_Desc);
            }
            if ((false == reader.IsDBNull(_.QT_Count)))
            {
                this._QT_Count = reader.GetInt32(_.QT_Count);
            }
            if ((false == reader.IsDBNull(_.QT_StartIndex)))
            {
                this._QT_StartIndex = reader.GetInt32(_.QT_StartIndex);
            }
            if ((false == reader.IsDBNull(_.QT_CurrentIndex)))
            {
                this._QT_CurrentIndex = reader.GetInt32(_.QT_CurrentIndex);
            }
            if ((false == reader.IsDBNull(_.QT_EndIndex)))
            {
                this._QT_EndIndex = reader.GetInt32(_.QT_EndIndex);
            }
            if ((false == reader.IsDBNull(_.QT_Used)))
            {
                this._QT_Used = reader.GetInt32(_.QT_Used);
            }
            if ((false == reader.IsDBNull(_.QT_Surplus)))
            {
                this._QT_Surplus = reader.GetInt32(_.QT_Surplus);
            }
            if ((false == reader.IsDBNull(_.QT_Template)))
            {
                this._QT_Template = reader.GetString(_.QT_Template);
            }
            if ((false == reader.IsDBNull(_.QT_UserName)))
            {
                this._QT_UserName = reader.GetString(_.QT_UserName);
            }
            if ((false == reader.IsDBNull(_.QT_SecretKey)))
            {
                this._QT_SecretKey = reader.GetString(_.QT_SecretKey);
            }
            if ((false == reader.IsDBNull(_.CreateOn)))
            {
                this._CreateOn = reader.GetDateTime(_.CreateOn);
            }
            if ((false == reader.IsDBNull(_.ModifiedOn)))
            {
                this._ModifiedOn = reader.GetDateTime(_.ModifiedOn);
            }
        }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if ((obj == null))
            {
                return false;
            }
            if ((false == typeof(qr_QrCodeType).IsAssignableFrom(obj.GetType())))
            {
                return false;
            }
            if ((((object)(this)) == ((object)(obj))))
            {
                return true;
            }
            return false;
        }

        public class _
        {

            /// <summary>
            /// 表示选择所有列，与*等同
            /// </summary>
            public static MySoft.Data.AllField All = new MySoft.Data.AllField<qr_QrCodeType>();

            /// <summary>
            /// 字段名：QrCodeTypeID - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field QrCodeTypeID = new MySoft.Data.Field<qr_QrCodeType>("QrCodeTypeID");

            /// <summary>
            /// 字段名：QT_Name - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field QT_Name = new MySoft.Data.Field<qr_QrCodeType>("QT_Name");

            /// <summary>
            /// 字段名：QT_Desc - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field QT_Desc = new MySoft.Data.Field<qr_QrCodeType>("QT_Desc");

            /// <summary>
            /// 字段名：QT_Count - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field QT_Count = new MySoft.Data.Field<qr_QrCodeType>("QT_Count");

            /// <summary>
            /// 字段名：QT_StartIndex - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field QT_StartIndex = new MySoft.Data.Field<qr_QrCodeType>("QT_StartIndex");

            /// <summary>
            /// 字段名：QT_CurrentIndex - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field QT_CurrentIndex = new MySoft.Data.Field<qr_QrCodeType>("QT_CurrentIndex");

            /// <summary>
            /// 字段名：QT_EndIndex - 数据类型：Int32
            /// </summary>
            public static MySoft.Data.Field QT_EndIndex = new MySoft.Data.Field<qr_QrCodeType>("QT_EndIndex");

            /// <summary>
            /// 字段名：QT_Used - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field QT_Used = new MySoft.Data.Field<qr_QrCodeType>("QT_Used");

            /// <summary>
            /// 字段名：QT_Surplus - 数据类型：Int32(可空)
            /// </summary>
            public static MySoft.Data.Field QT_Surplus = new MySoft.Data.Field<qr_QrCodeType>("QT_Surplus");

            /// <summary>
            /// 字段名：QT_Template - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field QT_Template = new MySoft.Data.Field<qr_QrCodeType>("QT_Template");

            /// <summary>
            /// 字段名：QT_UserName - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field QT_UserName = new MySoft.Data.Field<qr_QrCodeType>("QT_UserName");

            /// <summary>
            /// 字段名：QT_SecretKey - 数据类型：String
            /// </summary>
            public static MySoft.Data.Field QT_SecretKey = new MySoft.Data.Field<qr_QrCodeType>("QT_SecretKey");

            /// <summary>
            /// 字段名：CreateOn - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field CreateOn = new MySoft.Data.Field<qr_QrCodeType>("CreateOn");

            /// <summary>
            /// 字段名：ModifiedOn - 数据类型：DateTime(可空)
            /// </summary>
            public static MySoft.Data.Field ModifiedOn = new MySoft.Data.Field<qr_QrCodeType>("ModifiedOn");
        }
    }
}
